package com.mycode.controller;

import com.mycode.domain.ResponseResult;
import com.mycode.domain.TOrder;
import com.mycode.service.TOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Zengsh123
 * @date 2020-03-17 15:50.
 */
@RestController
public class OrderController {
    @Autowired
    private TOrderService tOrderService;

    @GetMapping("/order/create")
    public ResponseResult<Integer> create(TOrder order) {
        int num = tOrderService.create(order);
        return new ResponseResult<Integer>(200, "订单创建完成", num);
    }
}
